import UIKit

// 建议单独打开，会有 快捷提示 (点语法)

// 单行注释

/**
 多行注释
 */

// xcrun swift -version    swift的版本
//---------------------------------------------------------------------------------------

////// 一、基础数据类型
var str = "Hello, playground"

var a:String = "hello"

var b:Int = 10

var c:Float = 1.2

var d:Double = 1.5

var e:Bool = true

var f:Character = "A"

let g:Int = 12

//---------------------------------------------------------------------------------------
//////二、类型推断 - (Option + 点击 ： 查看类型)
var aa = "hello"
//aa = 112  // 可切换方便 被注释掉了
//aa = 'cc' // 可切换方便 被注释掉了

var bb = 12
//bb = 'aa'
bb = 4444

type(of: aa)

//---------------------------------------------------------------------------------------
////// 三、输出语句: rint(items: Any...)
print(type(of: true))

print(aa, bb)

//---------------------------------------------------------------------------------------
////// 四、拼接字符串:
let cc = aa + a
print(cc)
print(aa + a)

let dd = aa + "\(bb)"
print(dd)
print(aa + "   \(bb)")
print(aa + "adaddddd \(bb)")
print(aa + "adaddddd \(e)")
print("\(true) - \(100) - \(1.5) -")

//---------------------------------------------------------------------------------------
